<template>
  <div class="top">
    <!-- 弹出框 -->
    <Tanchu :getshome="getshome" v-if="isshow" @hello="isshow = false" />
    <div class="box">
      <div class="box1"><img :src="getshome.avatar" alt="图片加载失败" /></div>
      <div class="box2">
        <div class="box2-1">
          <img src="@/assets/img/brand.png" alt="" />
          <div>{{ getshome.name }}</div>
        </div>
        <div class="box3">{{ getshome.description }}</div>
        <div class="box2-2">
          <img src="@/assets/img/decrease.png" alt="" />
          <div v-if="getshome.supports">{{ getshome.supports[0] }}</div>
        </div>
      </div>
    </div>
    <div class="xob">
      <img src="@/assets/img/bulletin.png" alt="" />
      <div @click="isshow = true">{{ getshome.bulletin }}</div>
      <van-icon name="arrow" />
    </div>
    <div v-if="getshome.supports" @click="isshow = true" class="xob2">
      {{ getshome.supports.length + "个" }}<van-icon name="arrow" />
    </div>
  </div>
</template>

<script>
//引入弹窗
import Tanchu from "@/components/Tanchu.vue";

export default {
  props: ["getshome"],
  data() {
    return {
      isshow: false,
    };
  },
  components: {
    Tanchu,
  },
};
</script>

<style lang="less" scoped>
.box {
  display: flex;
  position: relative;
  padding: 20px;
  box-sizing: border-box;
  background: url("../assets/img/bg2.jpg") no-repeat ;
  background-size: 100% 100%;
  height: 100%;
  color: #ffffff;
  

  .box1 {
    img {
      height: 80px;
      width: 80px;
    }
  }
  .box2 {
    
    margin-left: 15px;
    flex: 1;
    .box3 {
      padding: 16px 0px;
      box-sizing: border-box;
      font-size: 18px;
    }
    .box2-1 {
      display: flex;
      vertical-align: middle;
      font-size: 20px;
      div {
        margin-left: 4px;
      }
      img {
        height: 100%;
        width: 40px;
      }
    }
    .box2-2 {
      display: flex;
      div {
        margin-left: 4px;
      }
      img {
        width: 15px;
      }
    }
  }
}
.top {
  height: 170px;
  position: relative;
}
.xob {
  bottom: 0;
  color: #ffffff;
  position: absolute;
  display: flex;
  justify-content: space-between;
  line-height: 30px;
  width: 100%;
  background: rgba(63, 56, 50, .4);
  font-size: 14px;
  align-items: center;

  div {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  img {
    height: 20px;
    margin-right: 2px;
  }
}
.xob2 {
  position: absolute;
  right: 10px;
  bottom: 35px;
  width: 50px;
  line-height: 20px;
  background: rgba(63, 56, 50, .4);
  color: #ffffff;
  font-size: 14px;
  border: 1px solid #cccccc;
  border-radius: 10px;
  text-align: center;
  vertical-align: middle;
}
</style>